<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:71:"D:\wamp\www\shop\public/../application/madmin\view\lexicon\showAdd.html";i:1548403214;s:71:"D:\wamp\www\shop\public/../application/madmin\view\Public\showBase.html";i:1547543098;}*/ ?>
<!DOCTYPE HTML>
<html>
	<head>
		<title>后台管理</title>
	    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	    <meta charset="UTF-8" />
	    <link rel="icon" type="image/ico" href="__IMG__/favicon.ico" />
	    <link type="text/css" rel="stylesheet" href="__CSS__/vendor/bootstrap/bootstrap.min.css" />
	    <link type="text/css" rel="stylesheet" href="__CSS__/content.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/vendor/font-awesome.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/vendor/bootstrap-checkbox.css" />
		<link type="text/css" rel="stylesheet" href="__JS__/vendor/chosen/css/chosen.min.css" />
		<link type="text/css" rel="stylesheet" href="__JS__/vendor/chosen/css/chosen-bootstrap.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/nicescroll.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/adapt.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/pagination.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/buttons.css" />
		<script type="text/javascript" src="__JS__/jquery-3.3.1.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/layer/layer.js"></script>
		<script type="text/javascript" src="__JS__/vendor/bootstrap/bootstrap.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/nicescroll/jquery.nicescroll.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/chosen/chosen.jquery.min.js"></script>
		<script type="text/javascript" src="__JS__/content.js"></script>
	</head>
	<body class="no-bg">
		<div id="wrap">
	        <div class="row">
	            <div id="content" class="col-md-12">
	            	
<div class="main">
    <div class="row">
        <div class="col-md-12">
            <section class="tile color transparent-black">
                <div class="tile-header bg-transparent-black-2">
                    <h1>
                        <?php if($Info == ''): ?>
                            <?php echo lang('XtCkXz'); else: ?>
                            <?php echo lang('XtCkGx'); endif; ?>
                    </h1>
                    <div class="controls">
                        <a href="javascript:void(0);" onclick="window.history.back();"><i class="fa fa-arrow-left"></i></a>
                        <?php if($Info == ''): ?>
                            <a href="<?php echo url('Lexicon/showAdd'); ?>"><i class="fa fa-refresh"></i></a>
                        <?php else: ?>
                            <a href="<?php echo url('Lexicon/showEdit', array('id'=>$Info['lexicon_id'])); ?>"><i class="fa fa-refresh"></i></a>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="tile-body nopadding">
                    <form class="FormTable" action="" method="post">
                        <div class="tile-body">
                            <div class="row">
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtCkBs'); ?></label>
                                    <input type="text" class="form-control" name="lexicon_name" value="<?php echo $Info['lexicon_name']; ?>" placeholder="<?php echo lang('XtCkBsWk'); ?><?php echo lang('XtCkBsAl'); ?>" />
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtCkMc'); ?></label>
                                    <input type="text" class="form-control" name="lexicon_title" value="<?php echo $Info['lexicon_title']; ?>" placeholder="<?php echo lang('XtCkMcWk'); ?>" />
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtCkSm'); ?></label>
                                    <input type="text" class="form-control" name="lexicon_remark" value="<?php echo $Info['lexicon_remark']; ?>" placeholder="<?php echo lang('XtCkSmWk'); ?>" />
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtCkNr'); ?>（<a style="color:#fff" href="javascript:void(0);" onclick="LexiconContentAdd();"><i class="fa fa-plus"></i></a>）</label>
                                </div>
                                <div id="LexiconContent">
                                    <?php if($Info == ''): ?>
                                        <div class="LexiconContent">
                                            <div class="form-group col-sm-4">
                                                <label><?php echo lang('XtCkNrCz'); ?>（<a style="color:#fff" href="javascript:void(0);" onclick="LexiconContentDel(this);"><i class="fa fa-close"></i></a>）</label>
                                                <input type="text" class="form-control" name="content_value[]" placeholder="<?php echo lang('XtCkNrCzWk'); ?>" />
                                            </div>
                                            <div class="form-group col-sm-4">
                                                <label><?php echo lang('XtCkNrCx'); ?></label>
                                                <input type="text" class="form-control" name="content_name[]" placeholder="<?php echo lang('XtCkNrCxWk'); ?>" />
                                            </div>
                                            <div class="form-group col-sm-4">
                                                <label><?php echo lang('XtCkNrPx'); ?></label>
                                                <input type="text" class="form-control" name="content_sort[]" placeholder="<?php echo lang('XtCkNrPxWk'); ?>" />
                                            </div>
                                        </div>
                                    <?php else: if(is_array($Info['lexicon_content']) || $Info['lexicon_content'] instanceof \think\Collection || $Info['lexicon_content'] instanceof \think\Paginator): $i = 0; $__LIST__ = $Info['lexicon_content'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                            <div class="LexiconContent">
                                                <div class="form-group col-sm-4">
                                                    <label><?php echo lang('XtCkNrCz'); ?>（<a style="color:#fff" href="javascript:void(0);" onclick="LexiconContentDel(this);"><i class="fa fa-close"></i></a>）</label>
                                                    <input type="text" class="form-control" name="content_value[]" value="<?php echo $vo['content_value']; ?>" placeholder="<?php echo lang('XtCkNrCzWk'); ?>" />
                                                </div>
                                                <div class="form-group col-sm-4">
                                                    <label><?php echo lang('XtCkNrCx'); ?></label>
                                                    <input type="text" class="form-control" name="content_name[]" value="<?php echo $vo['content_name']; ?>" placeholder="<?php echo lang('XtCkNrCxWk'); ?>" />
                                                </div>
                                                <div class="form-group col-sm-4">
                                                    <label><?php echo lang('XtCkNrPx'); ?></label>
                                                    <input type="text" class="form-control" name="content_sort[]" value="<?php echo $vo['content_sort']; ?>" placeholder="<?php echo lang('XtCkNrPxWk'); ?>" />
                                                </div>
                                            </div>
                                        <?php endforeach; endif; else: echo "" ;endif; endif; ?>
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtCkPx'); ?></label>
                                    <input type="text" class="form-control" name="lexicon_sort" value="<?php echo (isset($Info['lexicon_sort']) && ($Info['lexicon_sort'] !== '')?$Info['lexicon_sort']:0); ?>" placeholder="<?php echo lang('XtCkPxWk'); ?><?php echo lang('XtCkPxAl'); ?>" />
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="tile-footer bg-transparent-black-2 rounded-bottom-corners">
                    <div class="row">
                        <div class="col-sm-12 text-center">
                            <button type="button" class="btn btn-<?php echo config('CNF_BTNCOLOR'); ?> ajax-post"><?php echo lang('Form_Submit'); ?></button>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </div>
</div>

	        	</div>
	        </div>
	    </div>
		
    <script>
        $(function(){

        })

        function LexiconContentAdd(){
            var html = '<div class="LexiconContent">'+
                            '<div class="form-group col-sm-4">'+
                                '<label><?php echo lang("XtCkNrCz"); ?>（<a style="color:#fff" href="javascript:void(0);" onclick="LexiconContentDel(this);"><i class="fa fa-close"></i></a>）</label>'+
                                '<input type="text" class="form-control" name="content_value[]" placeholder="<?php echo lang("XtCkNrCzWk"); ?>" />'+
                            '</div>'+
                            '<div class="form-group col-sm-4">'+
                                '<label><?php echo lang("XtCkNrCx"); ?></label>'+
                                '<input type="text" class="form-control" name="content_name[]" placeholder="<?php echo lang("XtCkNrCxWk"); ?>" />'+
                            '</div>'+
                            '<div class="form-group col-sm-4">'+
                                '<label><?php echo lang("XtCkNrPx"); ?></label>'+
                                '<input type="text" class="form-control" name="content_sort[]" placeholder="<?php echo lang("XtCkNrPxWk"); ?>" />'+
                            '</div>'+
                        '</div>';
            $('#LexiconContent').prepend(html);
        }

        function LexiconContentDel(obj){
            $(obj).parents('.LexiconContent').remove();
        }
    </script>

	</body>
</html>